<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<%@include file="/WEB-INF/jsp/hadmin/addHeader.jsp"%>
</head>
<body class="gray-bg">
	<div class="row wrapper border-bottom white-bg page-heading">
		<div class="col-sm-10">
			<form class="form-horizontal m-t" id="${actionID }Form">
				<div class="form-group">
					<label class="col-sm-2 control-label">用户名:</label>
					<div class="col-sm-4">
						<p id="nickName" class="form-control-static">${domain.nickName }</p>
					</div>
					<label class="col-sm-2 control-label">手机号:</label>
					<div class="col-sm-4">
						<p class="form-control-static">${domain.phoneNumber }</p>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">公司名称:</label>
					<div class="col-sm-4">
						<p class="form-control-static">${domain.company.name }</p>
					</div>
					<label class="col-sm-2 control-label">公司地址:</label>
					<div class="col-sm-4">
						<p class="form-control-static">${domain.company.address }</p>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">法人名称:</label>
					<div class="col-sm-4">
						<p class="form-control-static">${domain.company.legalName }</p>
					</div>
					<label class="col-sm-2 control-label">法人手机:</label>
					<div class="col-sm-4">
						<p class="form-control-static">${domain.company.phone }</p>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">注册号:</label>
					<div class="col-sm-4">
						<p class="form-control-static">${domain.company.registerNumber }</p>
					</div>
					<label class="col-sm-2 control-label">建账日期:</label>
					<div class="col-sm-4">
						<p class="form-control-static"><fmt:formatDate pattern="yyyy-MM-dd" value="${domain.company.accountsDate }"/></p>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">营业执照:</label>
					<div class="col-sm-4">
						<img id="businessLicense" style="cursor: pointer;" onclick="imgClick(this);" src="${domain.company.businessLicense }" width="640" height="720"/>
					</div>
				</div>
				<div class="form-group">
					<label class="col-sm-2 control-label">环保资质:</label>
					<div class="col-sm-4">
						<img id="greenCredential" style="cursor: pointer;" onclick="imgClick(this);" src="${domain.company.greenCredential }" width="640" height="720"/>
					</div>
				</div>
				
				<div class="form-group">
					<div class="col-sm-5 col-sm-offset-2">
						<button class="btn btn-primary" onclick="formSubmit(true)" type="button">审核通过</button>
						<button class="btn btn-danger" onclick="formSubmit(false)" type="button">审核不通过</button>
					</div>
				</div>
			</form>
		</div>
	</div>
	<script type="text/javascript">
		function imgClick(dom) {
			console.log(dom.id);
		}
		function formSubmit(status) {
			$.ajax({
				type : "POST",
				toastMsg:true,
				//global:false,
				async:false,
				data : {
					"nickName" : $('#nickName').html(),
					"isAdopt" : status
				},
				dateType : "json",
				url : "<st:getCurrentUrl lastUrl='examineInfo.act' />",
				onSuccess : function(json) {
					parent.iframes['${actionID}'].$("#${actionID}Table").bootstrapTable("refresh")
					//parent.iframes['${actionID}'].refresh();
					parent.layer.close(parent.layer.getFrameIndex(window.name)); //再执行关闭   
				},
				error : function(json) {

				}
			});
			
			console.log(status);
			return false;
		}
	</script>
	<%@include file="/WEB-INF/jsp/hadmin/include/validateForm.jsp"%>
</body>

</html>
